import Vue from 'vue'
import Router from 'vue-router'
import home from '@/pages/home'    //主页
import shopping from '@/pages/shopping'  //商城
import my from '@/pages/my'   //个人中心
import tenant from '@/pages/tenant'  //产品详情
import login from '@/pages/login'    //登录
import register from '@/pages/register'  //注册
import forgetpawd from '@/pages/forgetpawd' //忘记密码
import merchantdetails from '@/pages/merchantdetails'  //借款页
import linkman from '@/pages/linkman'  //认证-联系信息
import sjld from '@/pages/sjld'  //三级联动地址
import IDcard from '@/pages/IDcard'  //认证-身份证
import workaddress from '@/pages/workaddress' //认证-单位信息
import bindbank from '@/pages/bindbank'   //绑定银行卡
import myorderform from '@/pages/myorderform' //我的借款订单
import all from '@/components/all'  //所有订单
import confirmed from '@/components/confirmed'  //待确认订单
import inpayment from '@/components/inpayment'  //还款中订单
import mybankcard from '@/pages/mybankcard'    //我的银行卡
import nottice from '@/pages/nottice'    //公告
import kefu from '@/pages/kefu'  //帮助与客服
import jk from '@/components/jk' //帮助与客服-借款相关问题
import hk from '@/components/hk' //帮助与客服-还款相关问题
import fy from '@/components/fy' //帮助与客服-费用问题
import faq from '@/components/faq'  //帮助与客服-常见问题
import system from '@/pages/system'  //系统设置
import hkdetail from '@/pages/hkdetail'  //还款订单详情
import revisionpawd from '@/pages/revisionpawd' //修改密码
import xyym from '@/pages/xyym' //个人征信协议
import zcxy from '@/pages/zcxy'  //注册协议
import yysrz from '@/pages/yysrz' //运营商认证

Vue.use(Router)

export default new Router({
  linkExactActiveClass: 'active',
  routes: [
    {path: '/',redirect:{name:'home'}},
    {path:'/home',name:'home',component:home},    
    {path:'/shopping',name:'shopping',component:shopping},
    {path:'/my',name:'my',component:my},
    {path:'/tenant/:id',name:'tenant',component:tenant},
    {path:'/login',name:'login',component:login},
    {path:'/register',name:'register',component:register},
    {path:'/forgetpawd',name:'forgetpawd',component:forgetpawd},
    {path:'/merchantdetails/:cpid',name:'merchantdetails',component:merchantdetails},
    {path:'/linkman',name:'linkman',component:linkman},
    {path:'/sjld',name:'sjld',component:sjld},
    {path:'/IDcard',name:'IDcard',component:IDcard},
    {path:'/workaddress',name:'workaddress',component:workaddress},
    {path:'/bindbank',name:'bindbank',component:bindbank},
    {path:'/myorderform',name:'myorderform',component:myorderform,redirect:{name:'all'},children:[
     { path:'all',name:'all',component:all},
     { path:'confirmed',name:'confirmed',component:confirmed},
     { path:'inpayment',name:'inpayment',component:inpayment}
    ]},
    {path:'/mybankcard',name:'mybankcard',component:mybankcard},
    {path:'/nottice',name:'nottice',component:nottice},
    {path:'/kefu',name:'kefu',component:kefu,redirect:{name:'jk'},children:[
      {path:'jk',name:'jk',component:jk},
      {path:'hk',name:'hk',component:hk},
      {path:'fy',name:'fy',component:fy},
      {path:'faq',name:'faq',component:faq}
    ]},
    {path:'/system',name:'system',component:system},
    {path:'/hkdetail/:ddid',name:'hkdetail',component:hkdetail},
    {path:'/revisionpawd',name:'revisionpawd',component:revisionpawd},
    {path:'/xyym',name:'xyym',component:xyym},
    {path:'/zcxy',name:'zcxy',component:zcxy},
    {path:'/yysrz',name:'yysrz',component:yysrz},
  ]
})
